<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-list.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <? include_once(ROOT_PATH_ . "/controller/common/module/head.php"); ?>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?>
        </div>


        <div id="content">
            <?php $page_title='单位列表';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>

            <?php include '/module/mod-search.php'; ?>

<div class="list-box">
    <hr/>
<!--<div class="statistic">-->
<!--    <a class="layui-btn  layui-btn-sm" href="collect.php?nav-itemed=unit"><i class="layui-icon">&#x1005;</i> 全选</a>-->
<!--    <a class="layui-btn  layui-btn-sm" href="collect.php?nav-itemed=unit"><i class="fa fa-bar-chart-o" aria-hidden="true"></i>  统计信息</a>-->
<!--    <a class="layui-btn  layui-btn-sm" href="--><?// echo $domain ?><!--/controller/extender/unit/view/detail-add.php?now_extender=unit"><i class="layui-icon">&#xe608;</i>  新增单位</a>-->
<!--    <hr/>-->
<!--</div>-->
















<div class="list-boxes layui-form">



<table class="layui-table">
  <colgroup>
    <col width="250">
	<col >
	<col >
	<col >
	<col >
	<col width="200">

  </colgroup>
  <thead>
    <tr>
      <th>单位</th>
      <th>账号</th>
      <th>地址</th>
      <th>行业</th>
      <th>状态</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>




	<?php
	for ($i = 0; $i < $detailnum; $i++) {
    ?>


        <tr id="item<?echo $detail[$i]['nid']?>"  >

      <td>
          <?
          if(countMenber($detail[$i]['nid'],$table_prefix) == 0){
              ?>
          <i class="fa fa-exclamation-triangle" style="color: #fdd305;" aria-hidden="true" id="triangle_<?php echo $detail[$i]['nid']?>" onmouseover="show_remark ('没有联系人','triangle_<?php echo $detail[$i]['nid']?>')"></i>
          <? }?>
          <? if($detail[$i]['sname']){echo $detail[$i]['sname'];}else{echo $detail[$i]['name'];}?>
      </td>

            <td><?echo $detail[$i]['mid']?></td>


            <td >
                <? if(($detail[$i]['address'])and($detail[$i]['address']!="  ")){ ?>
                    <span  id="addr_<?php echo $detail[$i]['nid']?>" onmouseover="show_remark ('<?php echo $detail[$i]['address']?>','addr_<?php echo $detail[$i]['nid']?>')" >
              <?
              $conditon['str']=str_replace(array('恩平市','广东省'),"",$detail[$i]['address']);
              $conditon['len']=20;
              $conditon['from']=0;
              echo utf8_substr($conditon)."..."?></span>
                    <?;}?>

            </td>


      <td><?echo $detail[$i]['type']?></td>
      <td>          <a href="status-switch-list.php?nid=<? echo $detail[$i]['nid']?>&now_extender=unit" class="layui-btn layui-btn-sm">
              <? if($detail[$i]['status']!=="正常"){echo "待审核";}else{echo $detail[$i]['status'];}?>
          </a>

<!--          --><?// if(!$detail[$i]['status']){echo "待审核";}else{echo $detail[$i]['status'];}?>

      </td>

	  <td>


          <a href="detail-statistic.php?&nid=<? echo $detail[$i]['nid'] ?><? echo $pagenumber_url . $sortby_url  . $now_extender  ?><? echo $url_str ?>"
             class="layui-btn   layui-btn-sm" target="_blank vftg bgcbcbc">
              <i class="layui-icon">&#xe621;</i> 信息</a>


<!--          <a href="detail-edit.php?nid=--><?// echo $detail[$i]['nid'] ?>
<?// echo $pagenumber_url . $sortby_url . $navitemed_url . $system_part . $term_nid ?><!--"-->
<!--             class="layui-btn   layui-btn-sm">-->
<!--              <i class="layui-icon">&#xe642;</i> 修改-->
<!--          </a>-->





          <a href="javascript:void(0)" onclick="deleter(<?php echo $detail[$i]['nid']?>,'delete')"
             class="delete layui-btn  layui-btn-sm" > <i class="layui-icon">&#xe640;</i>删除
          </a>


      </td>
    </tr>
<?;}?>


  </tbody>
</table>






</div>


<div class="list-box-function" <? if ($detailnum == 0) { echo "style" . "='display:none'";} ?>>
<?php include 'module/page_numbers.php'; ?>
</div>




<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>








<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>
